﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminManage/MasterPage.master" AutoEventWireup="true" CodeFile="ManageIndex.aspx.cs" Inherits="Admin_TreeView" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder3" runat="Server">
    <script language="javascript" type="text/javascript">
    </script>

    <script type="text/javascript">
        function initFrame() {
            var winWidth = 0;
            var winHeight = 0;

            //获取窗口宽度
            if (window.innerWidth)
                winWidth = window.innerWidth;
            else if ((document.body) && (document.body.clientWidth))
                winWidth = document.body.clientWidth;
            //获取窗口高度
            if (window.innerHeight)
                winHeight = window.innerHeight;
            else if ((document.body) && (document.body.clientHeight))
                winHeight = document.body.clientHeight;

            //通过深入Document内部对body进行检测，获取窗口大小
            if (document.documentElement
               && document.documentElement.clientHeight
               && document.documentElement.clientWidth) {
                winHeight = document.documentElement.clientHeight;
                winWidth = document.documentElement.clientWidth;
            }

            //结果输出

            CHeight = winHeight - 165 + "px";
            if (winHeight - 165 < 606) {
                CHeight = "605px";
            }

            CWidth = winWidth - 270 + "px";
            document.getElementById("iframeLeft").style.height = CHeight;
            document.getElementById("iframeRight").style.height = CHeight;
            document.getElementById("iframeRight").style.width = CWidth;
            document.getElementById("divContetnRight").style.width = CWidth;
        }

        function hideLeftNav() {
            //leftNavObj = document.getElementById("menu");
            //lineObj = document.getElementById("_line");
            divMenuLeftObj = document.getElementById("divMenuLeft");
            divContetnRightObj = document.getElementById("divContetnRight");
            divHideObj = document.getElementById("divHide");
            iframeRightObj = document.getElementById("iframeRight");
            
            if (divMenuLeftObj.style.display != "none") {
                divMenuLeftObj.style.display = "none";
                divContetnRightObj.style.width = 285 + parseInt(CWidth) + "px";
                iframeRightObj.style.width = parseInt(CWidth) + 285 + "px";
                divHideObj.innerHTML = "▶▶ ";
            }
            else {
                divMenuLeftObj.style.display = "block";
                divMenuLeftObj.style.width = 285 + "px";
                divContetnRightObj.style.width = parseInt(CWidth) + "px";
                iframeRightObj.style.width = parseInt(CWidth) +"px";
                divHideObj.innerHTML = "◀◀";
            }
        }
    </script>
     
    <div style="height:100%; width:100%;margin:0px; padding:0px; float:left;z-index:0;" >
         
            <div   style="float:left; background:#118ccc; background:#118ccc; display:block;" id="divMenuLeft" >
                  <iframe  onload="initFrame(); " src="TreeView.aspx" name="leftFrame" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="width:250px;" id="iframeLeft"  allowTransparency="true">
                </iframe>
            </div>
            <div style="background:#f2eada;position:absolute;left:250px;top:105px; " id="divContetnRight" >
                <iframe src="WelcomePage.aspx"   scrolling="yes" border="0" id="iframeRight" name="rightFrame" frameborder="0" marginwidth="0" marginheight="0"   allowTransparency="true"  >
                </iframe>
            </div> 
    </div>
    <!--<div id="divHide" style="position:absolute; z-index:900; left:10px; top:95px;   width:100px; font-family:'微软雅黑'; font-size:15px; color:#ff6a00;" onclick="hideLeftNav()" >◀◀ </div>-->
</asp:Content>
